package com.Nov_TwentySix;

import java.util.HashSet;
import java.util.Set;

public class Solution1805 {

    public int numDifferentIntegers(String word) {
        Set<String> set=new HashSet<>();
        int n=word.length();
        char[] array=word.toCharArray();
        for (int i = 0; i < n; i++) {
            if (array[i]<='9'){
                int j=i;
                while (j<n&&array[j]<='9') j++;
                while (i<j&&array[i]=='0') i++;
                set.add(word.substring(i,j));
                i=j;
            }
        }
        return set.size();
    }

    public static void main(String[] args) {
        Solution1805 solution1805=new Solution1805();
        System.out.println(solution1805.numDifferentIntegers("a123bc34d8ef34"));
    }
}
